Hierarchical organization for scale-out cluster

ABSTRACT

Performing a distributed data operation. A method includes receiving a request for one or more data operations from a first computing system, such as a client. The method further includes determining a number of node endpoints that can be used to satisfy the query. Based on the number of node endpoints, the method further includes selecting a plan from the group consisting essentially of a flat data operation plan, a hierarchical data operation plan or a combination of partially flat/partially hierarchical data operation plan. The request for one or more data operations is serviced using the selected data operation plan.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.14/144,355 filed on Dec. 30, 2013, entitled “HIERARCHICAL ORGANIZATIONFOR SCALE-OUT CLUSTER,” which issued as U.S. Pat. No. 9,723,054 on Aug.1, 2017, and which application is expressly incorporated herein byreference in its entirety.

BACKGROUND Background and Relevant Art

Computers and computing systems have affected nearly every aspect ofmodern living. Computers are generally involved in work, recreation,healthcare, transportation, entertainment, household management, etc.

Further, computing system functionality can be enhanced by a computingsystems ability to be interconnected to other computing systems vianetwork connections. Network connections may include, but are notlimited to, connections via wired or wireless Ethernet, cellularconnections, or even computer to computer connections through serial,parallel, USB, or other connections. The connections allow a computingsystem to access services at other computing systems and to quickly andefficiently receive application data from other computing system.

Interconnection of computing systems has facilitated distributedcomputing systems, such as so-called “cloud” computing systems. In thisdescription, “cloud computing” may be systems or resources for enablingubiquitous, convenient, on-demand network access to a shared pool ofconfigurable computing resources (e.g., networks, servers, storage,applications, services, etc.) that can be provisioned and released withreduced management effort or service provider interaction. A cloud modelcan be composed of various characteristics (e.g., on-demandself-service, broad network access, resource pooling, rapid elasticity,measured service, etc), service models (e.g., Software as a Service(“SaaS”), Platform as a Service (“PaaS”), Infrastructure as a Service(“IaaS”), and deployment models (e.g., private cloud, community cloud,public cloud, hybrid cloud, etc.).

Cloud and remote based service applications are prevalent. Suchapplications are hosted on public and private remote systems such asclouds and usually offer a set of web based services for communicatingback and forth with clients.

Cloud systems are an example of a service oriented architecture whereservices are distributed across a number of different nodes in a system.However, on-premise systems may also be implemented in a distributedfashion to provide functionality according to a service orientedarchitecture.

One service that can be provided in a distributed fashion is a databaseservice. When a query is made on a distributed database service,multiple nodes in the service may be involved in satisfying the query.In particular, the data returned or used as a result of the query may bestored on multiple different nodes.

Portions of data will be returned from different nodes and the portionswill be assembled to create a complete result. Thus, there arecommunication and overhead costs for communicating with the differentnodes and for assembling results. Some current systems are able toinvolve as many as 200 different nodes without significant degradationof performance. However, scaling beyond that point can result insignificant degradation to the distributed database performance. Inparticular, such systems are often implemented using a hub and spokearchitecture and have a limited fan-out on the number of spokes.

The subject matter claimed herein is not limited to embodiments thatsolve any disadvantages or that operate only in environments such asthose described above. Rather, this background is only provided toillustrate one exemplary technology area where some embodimentsdescribed herein may be practiced.

BRIEF SUMMARY

One embodiment illustrated herein includes a method that may bepracticed in a distributed computing environment, The method includesacts for performing a distributed data operation. The method includesreceiving a request for one or more data operations from a firstcomputing system, such as a client. The method further includesdetermining a number of node endpoints that can be used to satisfy thequery. Based on the number of node endpoints, the method furtherincludes selecting a plan from the group consisting essentially of aflat data operation plan, a hierarchical data operation plan or acombination of partially flat/partially hierarchical data operationplan. The request for one or more data operations is serviced using theselected data operation plan.

This Summary is provided to introduce a selection of concepts in asimplified form that are further described below in the DetailedDescription. This Summary is not intended to identify key features oressential features of the claimed subject matter, nor is it intended tobe used as an aid in determining the scope of the claimed subjectmatter.

Additional features and advantages will be set forth in the descriptionwhich follows, and in part will be obvious from the description, or maybe learned by the practice of the teachings herein. Features andadvantages of the invention may be realized and obtained by means of theinstruments and combinations particularly pointed out in the appendedclaims. Features of the present invention will become more fullyapparent from the following description and appended claims, or may belearned by the practice of the invention as set forth hereinafter.

BRIEF DESCRIPTION OF THE DRAWINGS

In order to describe the manner in which the above-recited and otheradvantages and features can be obtained, a more particular descriptionof the subject matter briefly described above will be rendered byreference to specific embodiments which are illustrated in the appendeddrawings. Understanding that these drawings depict only typicalembodiments and are not therefore to be considered to be limiting inscope, embodiments will be described and explained with additionalspecificity and detail through the use of the accompanying drawings inwhich:

FIG. 1 illustrates interaction with a distributed database system;

FIG. 2 illustrates a simplified example of a master and a number ofslave nodes;

FIG. 3 illustrates various steps for distributed processing;

FIG. 4 illustrates various details for a distributed query;

FIG. 5 illustrates a hierarchical node arrangement;

FIG. 6 illustrates a hierarchical node arrangement where nodedistribution is done in a substantially equal fashion;

FIG. 7 illustrates an alternative arrangement for hierarchical nodes;and

FIG. 8 illustrates a method of performing a distributed data operation.

DETAILED DESCRIPTION

Some embodiments may be directed towards implementation of a distributeddatabase system. In particular, in a distributed database system, shardsof data are stored on various nodes within the system. The shards can beretrieved from the nodes, merged, and operations performed on the mergeddata.

An example is illustrated FIG. 1. FIG. 1 illustrates a client 102. Theclient 102 optionally communicates a query to a load balancer 104. Theload balancer 104 sends queries from the various clients to a gateway106. Note, that in some embodiments, the client 102 can send a querydirectly to the gateway 106.

The gateway 106 provides a single endpoint, such as in some embodiments,an XML for Analysis (XMLA) endpoint, for users to connect to a cluster.In some embodiments, the gateway may include functionality similar to,and may be based on the AS Windows Azure™ gateway available fromMicrosoft Corporation of Redmond Wash. However, some embodiments mayfurther include an enhanced security model for the gateway 106. Forexample, the gateway 106 may include support for Kerberos to enableon-premise scenarios.

On an initial connection from a client 102, the gateway 106 isresponsible for identifying a database and selecting an appropriateserver node from the backend 108. That server node becomes the masterserver node for the user's session and all subsequent requests on thatsession are directed to the same master server node. One or moredifferent policies can be used by the gateway 106 to select a masterserver node. For example, in some embodiments, a simple round-robinselection may be used. Alternatively or additionally, random selectionmay be used. Alternatively or additionally, a more sophisticatedload-balancing or adaptive algorithm could be used.

Embodiments may be implemented where the gateway 106 is largelystateless. In such embodiments, for scalability or reliability, it ispossible to have multiple gateways within a single cluster 100. Eachgateway will have a unique endpoint. As such, a client may have to havesufficient intelligence to choose the right one. Alternatively, thegateways could be behind a network load-balancer 104 which could ensurethat clients connect with the correct gateway.

Thus, the gateway 106 selects a server node to coordinate servicing thequery. The selected node acts as a master node. The master nodecommunicates with various slave nodes in the back end 108. The slavenodes host (such as by storing or pointing to) shards of data that areneeded to service the query from the client 102. As noted, differentnodes in the backend 108 store (or access from persistent storage,illustrated as store 110), different shards of data that may be neededto service the query from the client 102.

FIG. 1 further illustrates a coordinator 112. The coordinator 112implements a directory that maps the partitions of a sharded table ontothe server nodes in the cluster 100. The coordinator 112 provides, inthe illustrated example, a simple XMLA-based protocol that allows themaster server node to query which server nodes are (or should be)hosting any given shard of data. Once the master server node gets thisinformation from the coordinator 112, it sends further requests forshards directly to the appropriate server node.

The coordinator 112 is built on top of a cluster fabric. The clusterfabric makes the policy decisions about where to placeshards/partitions.

To prevent the coordinator 112 from being a single point of failure,embodiments may have multiple coordinators within a cluster 100.

Every server node in the cluster can function as both a master servernode and a slave server node. The master server node is responsible forreceiving the query from the client 102 (after it passes through thegateway 106) and performing normal query handling. Once the queryreaches the storage layer of the backend 108, the in memory businessintelligence engine is responsible for parallelizing that query acrossthe shards. Then the master server node sends a query request to thecoordinator 112 to find the location of the shards that are involved inthe query. Once the master server node gets a response back from thecoordinator 112, it sends the appropriate subqueries directly to thoseserver nodes. These server nodes are referred to as slave server nodes.Note that a particular server node can be both a master server node andslave server node for the same query.

When all the slave server nodes have finished processing theirsub-queries, the results are returned to the master server node which isresponsible for the final aggregation of the slave node results tocreate the final response to the client. A simplified example isillustrated in FIG. 2. FIG. 2 illustrates a master node 202. The masternode 202 communicates with a set of slave nodes 204-1 204-2 204-3through 204-n.

Within an instance of a service, a loaded database will include thedimension tables for the database that support relationships to asharded table.

In the illustrated embodiment, the server nodes are responsible fordeployment and operation of the physical cluster. In particular, theserver nodes may be responsible for the bare metal deployment of theoperating system to the nodes that make up the cluster (gateway,coordinator, server instances). In addition to deployment the serviceson these nodes may continually monitor the health of the cluster and beused to diagnose problems.

The store 110 is simply a reliable filestore large enough to hold theentire database. Any appropriate store may be used. The store 110contains the canonical truth of what the database looks like. The servernodes in the cluster will pull the parts of the database they needdirectly from the store 110 onto their local disks. The server nodelocal disks serve as another level of caching. Examples of varioussystems that may be used as the store 110 include one or more of thefollowing: Windows Storage Server or Windows Azure™ Blob Storage; bothavailable from Microsoft Corporation of Redmond Wash.; NetApp Appliance,available from NetApp of Sunnyvale, Calif.; HDFS Cluster available fromApache Software Foundation of Forest Hill, Md. From an implementationpoint of view a server node instance will serialize partition/shards tothe storage sub system. The server node will work with streams, whichare easily supported by the above examples.

Referring now to FIG. 3, a detailed example of steps for distributedprocessing is illustrated. As illustrated at 301, a client 102 sends aprocess request to the cluster 100 via a gateway 106. As illustrated at302, the gateway 106 selects and forwards a process update to a servernode instance.

As illustrated at 303, a master server node instance 120 contacts thecoordinator 112 to obtain a write lock on the database and to requestslocations of shards of data. As illustrated at 304, the master servernode instance 120 forwards processing commands to slave server nodeinstances 122 and 124. As illustrated at 305, a slave server nodeinstance 124 reports processing phase one complete. As illustrated at306, the master server node instance 120 instructs the slave server nodeinstance 124 to begin a dictionary merge.

As illustrated at 307, the slave server node instance 124 fetches thecurrent master dictionary from the reliable storage 110 and performs themerge. As illustrated at 308, the slave server node instance 124persists the merged dictionary to the reliable storage 110. Asillustrated at 309, the slave server node instance 124 reports to masterserver node 120 that the merge is complete for the shard.

As illustrated at 310 a next slave server node fetches the currentdictionary and performs a merge. As illustrated at 311 the next slaveserver node persists to the merged dictionary to reliable storage 110.

As illustrated at 312 the master server node instance 120 reports to thegateway 106 that the operation is complete. This causes a release of thewrite lock at the coordinator 112. As illustrated at 313, the gateway106 returns result back to the client 102.

Some embodiments include a new type of encoding (on top of hash anddictionary based encoding) for measures referred to herein as “unencodedmode” or “raw encoding mode”. In such a mode, embodiments do not use asurrogate key (referred to herein as a dataid) to map the actual values,and instead persist the values in unencoded form (but nonetheless, stillcompressed). This mode allows for higher level parallelization. Forexample, this may eliminate the need for parallel dictionary insertsduring parallel processing on a node, eliminate the need to amortizeinitial dictionary building on master node, eliminate the need totransfer the dictionary between nodes and/or the ability to reconcileclashes regarding dataids. However, a column with an “unencoded”dictionary will not be able to be used on axis in some applications,such as Excel® or be involved in groupby operations. However, such acolumn can still be used inside aggregations and in predicates.

Once all shards have completed their local transactions and have finaldata synced/copied (as illustrated at 311) to the persistence layerembodied by the reliable storage 110, the master server node 120 cancompute a new master version map that takes into account the newpartition data available on the persistence layer, and then push the newmaster version map on the persistence layer (in some embodiments, usinga two-phase commit). Partition processing at this point will becompleted, the master server node 120 will return the results to thegateway 106 and the gateway will return the results to the client 102.

Embodiments may perform cleanup of stale copies of partition data fromthe persistence layer in instances involving failed transactions. Insome embodiments, the responsibility for this cleanup (on local nodes)is owned by the master server node 120. Additionally, in someembodiments, a master server node may include functionality forinforming the coordinator about successful transactions. Thus, thecoordinator will be aware of new metadata/partitions resulting from datadefinition language operations.

FIG. 4 illustrates details for a distributed query. As illustrated at401, a client 102 issues a query to the compute cluster 100 byconnecting to the gateway 106. As illustrated at 402, gateway selects aninstance of a server node 120 running on a round robin basis (or otherappropriate basis, such as randomly) from the compute cluster 100 andforwards the query request. As illustrated at 403, the instance of aserver node 120 contacts the coordinator 112 to find the location of theshards needed to service the query.

As illustrated at 404, the master server node 120 requests slave servernodes 122 and 124 to perform queries against shards. As illustrated at405, the slave server nodes 122 and 124 return results to the masterserver node 120. As illustrated at 406, the master server node 120returns the merged result back to the gateway 106. As illustrated at407, the gateway 106 returns the result back to the client 102.

Now that details have been illustrated, discussion is again returned tothe simplified representation of FIG. 2. The master node 202 may havefan-out capability limitations that limit the number of slave nodes thatthe master node 202 can communicate efficiently with. For example,embodiments that utilize xVelocity in SQL Server®, embodiments can scaleto about 100 to 200 nodes. Beyond that, serious performance degradationmay occur. Thus, for 100-200 nodes, each with 120 GB of memory suchembodiments can accommodate (given an average of 10× compression) 1.2TB×(100-200)=>roughly 200 TB of uncompressed data (although someembodiments may be able to accommodate up to a half PB for highercompressions). Beyond that point, experiments have shown the overhead ofcommunication as well as the server inefficiencies become prevalent.Previously, this had been acceptable for distributed databases. However,recent advancements have made larger distributed databases desirable. Inparticular, the introduction of solid state drive (SSD) paging greatlyincreases the amount of perceived memory available from the 120 GB ofphysical memory to about 2.4 TB of SSD capacity. Some embodiments mayuse 6×400 GB Intel s3700 drives available from Intel Corporation ofSanta Clara, Calif., or 5×480 GB Samsung SM843T drives available fromSamsung C&T Corporation of Seoul, South Korea. However, the bandwidth isreduced to about 3 GB/sec for the Intel SSDs or 1.5 GB/sec in the caseof the Samsung SSD. The memory bandwidth is 120 GB/sec, however, a CPUbottleneck will be reached at about 30 GB/sec (assuming 2×8 coresrunning at about 2.2 GHz). Thus, alternative scale-out is performed tomaintain the bandwidth, by a factor of 10×.

In addition to the advancements around using SSDs, there is a generaldesire to host more than 200 TB of uncompressed data.

To address the communication flooding (both at the network layer as wellas at the server connection layer) embodiments can implement ahierarchical-unbalanced architecture, when needed.

As illustrated in FIG. 5, a master node 502 communicates with a set ofendpoints that could either be slave nodes (such as slave node 504-1) orsatrap nodes (such as satrap node 506-1), which manage slave nodes (suchas slave node 508-1, 508-2, 508-3 through 508-m) in the same fashion asthe master node 502, but are themselves managed by the master node 502.The architecture is said to be hierarchical because there are now twolayers of slave nodes and it is said to be unbalanced as the master node502 could communicate directly with a mix of satrap nodes (e.g. satrapnode 506-1) and slave nodes (e.g. slave node 504-1). A flow tree mighttherefor, have two levels but where some leaves are on level one (i.e.slave nodes communicating with the master node 502) and some on leveltwo (i.e. slave nodes communicating with a satrap node, whichcommunicates with the master node 502). This architecture may bereferred to herein as MSS (master-satrap-slave).

Embodiments may be dynamic in nature and may select a topology planbased on a given particular query. In particular, in some examplequeries, a flat two level tree may be sufficient and more efficient athandling the query. In some query examples, a mixed topology plan with amaster node communicating with some satrap nodes (which furthercommunicate with slave nodes) and directly (i.e. not through a satrapnode) with some slave nodes may be more efficient at handling a query.And in some examples, a topology plan where the master node onlycommunicates with satrap nodes, which further communicate with slavenodes. For example, the master node 502 would only communicate throughsatrap nodes to communicate with slave nodes and would not communicatewith the slave nodes directly.

Thus, if it can be determined that a model is small, in that it can bedetermined that the number of nodes hosting shards for servicing aquery, is below some threshold (e.g., about 200 in the illustratedexample), then a query can be handled with only flat communication, suchthat a two-level tree with master nodes and slave nodes is sufficient.

If the model grows, embodiments still have flexibility. For example,embodiments could communicate with the most used partitions in a directfashion (i.e. master-slave), while less use partitions can be accessedthrough the three layer pipeline (master-satrap-slave).

Experimental results have shown that in one embodiment, network edgetraversal (with payload—i.e. request/response) is 1.4 ms (for the 95thpercentile). A double-edge traversal clocked for the 95th percentile isabout 3.2 ms. With the asymmetric freedom described above, embodimentscan achieve essentially infinite scale (e.g. up to about 5000 nodes).

Models that can scale up to 100-200 nodes can be used flat (with thecurrent 1.4 ms penalty) while (potentially much) larger models becomefeasible with a slightly higher penalty.

The following illustrates scaling factors and performance for someexample, embodiments using the components described above. To achieve a1 second response time for a query, some embodiments may need to scan 3GB (this is the paging performance on the Intel drives described above).Assuming, roughly, a 15% column selectivity, embodiments can hostapproximately 20 GB of a compressed model per server. By implementingpaging, embodiments can host about 100 such sharded models per machine.So, we have the following options:

A pure “flat” model, as described above in conjunction with FIG. 2, canbe used up to about 100 to 200 nodes. Assuming 100 nodes, embodimentscould implement a 2 TB compressed mode). Assuming 10× compression, theflat model can handle up to 20 TB models.

A “master-satrap-slave” model can be used on about up to 5000 nodes(leading to a 100 TB compressed model). Assuming 10× compression, thismeans embodiments could handle up to 1 PB models with a 1 second scanfor virtually any query. Additionally, multiple 1 PB models could beimplemented.

Additional details are now illustrated with respect hierarchical andmixed flat/hierarchical models in the examples illustrated in FIGS. 6and 7. In particular, details are illustrated with respect to variousways that satrap nodes can be arranged with respect to a master node andways that slave nodes can be arranged with respect to master nodes andsatraps.

FIG. 6 illustrates an example where a hierarchical node distribution isdone in a substantially equal fashion. In particular in onesubstantially equal example, as described previously, operations may beperformed using the coordinator 112 to determine the number (n) of nodesneeded to satisfy a query. In some embodiments, the square root of n iscalculated. If the square root is a whole number, then In satrap nodesare used with each satrap controlling In slave nodes. If the square rootof √n is not a whole number, then adjustments may need to be made suchthat one or more of the satraps may have to host one more or one lessslave nodes than one or more other satraps. Such an arrangement stillfalls within the scope of substantially equal as used herein. Thus, FIG.7 illustrates a master node 602, satrap nodes 604-1, 604-2, through604-√n, and each satrap hosting √n slave nodes.

In an alternative example illustrated in FIG. 7, a preselected maximumnumber of nodes is hosted by the master node 702. If that number is notsufficient, then at least a portion of nodes that are hosted by themaster node 702 become satraps and each host a preselected maximumnumber of nodes or a number of nodes sufficient to satisfy the need forn nodes. Thus, in the example illustrated in FIG. 7, the master node 702hosts nodes 704-1, 704-2 through 704-max (referred to hereincollectively as the 704 series nodes). Nodes 704-1 and 704-2 act assatrap nodes while the rest of the 704 series nodes act as slave nodes.Satrap node 704-1 hosts the maximum number of nodes that have beendetermined that it should host. Satrap node 704-2 hosts a number ofnodes such that all of the 704 series nodes plus any other slave nodeshosted by satrap nodes is approximately equal to the n nodes needed tosatisfy the query.

In yet another example, not shown in the figures, slave nodes could bedistributed around satrap nodes in an essentially equal fashion. Inparticular, a maximum number of nodes may be hosted by a master node(such as is illustrated by the 704 series nodes hosted by the masternode 702. Slave nodes are then distributed around these nodes (such asin a round robin or random fashion) until a sufficient number of nodesare being hosted to approximately equal the n nodes needed to satisfythe query.

The following discussion now refers to a number of methods and methodacts that may be performed. Although the method acts may be discussed ina certain order or illustrated in a flow chart as occurring in aparticular order, no particular ordering is required unless specificallystated, or required because an act is dependent on another act beingcompleted prior to the act being performed.

Referring now to FIG. 8, a method 800 is illustrated. The method 800 maybe practiced in a distributed computing environment. The method 800includes acts for performing a distributed data operation. The method800 includes receiving a request for one or more data operations from afirst computing system (act 802). For example, as illustrated in FIG. 1,the gateway 106 may receive a request from a client 1002. As noted, thismay be done directly by the gateway 106 directly receiving the requestfrom the client 102, or in other ways, such as by the gateway receivingthe request through a load balancer 104.

The method 800 further includes determining a number of node endpointsthat can be used to satisfy the query (act 804). For example, thegateway 106 may determine a number of nodes in the backend 108 thatwould be needed to satisfy the request from the client.

The method 800 further includes, based on the number of node endpoints,selecting a plan from the group consisting essentially of a flat dataoperation plan, a hierarchical data operation plan or a combination ofpartially flat/partially hierarchical data operation plan (act 806). Forexample, the gateway 106 may select to use a flat plan such as thatillustrated in FIG. 2, a strictly hierarchical plan having at leastthree hierarchical levels, such as that illustrated in FIG. 5, or amixed plan, such as those illustrated in FIGS. 6 and 7.

The method 800 further includes servicing the request for one or moredata operations using the selected data operation plan (act 808).

The method 800 may further include determining the endpoints hostingshards needed to satisfy the data operations. In some such embodiments,determining a number of node endpoints is based on the node endpoints onwhich the shards are hosted. For example, the gateway 106 may be able toconsult a sharded table that indicates where particular shards arehosted. In this way, the gateway 106 can identify the exact nodes neededto satisfy the request. Further, in some such embodiments, the method800 may include determining that the plan should be at least partiallyhierarchical, and selecting a number of intermediary endpoints. In someembodiments, the endpoints may be selected based on the location ofendpoints hosting shards. For example, an intermediary endpoint may beselected to be a master for shard hosting endpoints that share the sameserver rack as the intermediary endpoint, that are in the samegeographical location as the intermediary endpoint, that are in logicalproximity (e.g. same domain or subnet) as the intermediary endpoint,share the same fault domain as the intermediary endpoint, etc.

Alternatively or additionally, the intermediary nodes may be selectedbased on a cost determination including factors including communicationcosts to hierarchical nodes and cost to assemble distributed queryresults. In particular, there are various costs associated withservicing a request. Such costs may be costs in terms of time orresource usage. In particular, such costs may include costs for networkcommunications, costs for assembling shards, and other costs. Costs canbe increased (or decreased) by various conditions. For example, networkcommunications may become more difficult, a machine may becomeoverloaded, etc. When selecting whether to use an intermediate node orto simply add another slave node, a cost comparison may be implemented.In particular, there is a time and resource cost with a double networkjump when a master must communicate with a slave through a satrap.However, the server may be overloaded if the server attempts tocommunicate directly with the slave. Thus, a cost comparison can beperformed to determine if it is more efficient to simply add anotherslave to a server or to use a satrap to communicate with slaves.

Some embodiments of the method 800 may include selecting intermediarynode endpoints in a round robin fashion. Alternatively or additionally,embodiments of the method 800 may include selecting intermediary nodeendpoints in a random fashion.

Some embodiments of the method 800 may be implemented where the plan isconfigured such that a substantially even distribution of endpoint nodesis made across intermediary nodes. Such an example is illustrated byFIG. 6 and the accompanying description above.

Further, the methods may be practiced by a computer system including oneor more processors and computer readable media such as computer memory.In particular, the computer memory may store computer executableinstructions that when executed by one or more processors cause variousfunctions to be performed, such as the acts recited in the embodiments.

Embodiments of the present invention may comprise or utilize a specialpurpose or general-purpose computer including computer hardware, asdiscussed in greater detail below. Embodiments within the scope of thepresent invention also include physical and other computer-readablemedia for carrying or storing computer-executable instructions and/ordata structures. Such computer-readable media can be any available mediathat can be accessed by a general purpose or special purpose computersystem. Computer-readable media that store computer-executableinstructions are physical storage media. Computer-readable media thatcarry computer-executable instructions are transmission media. Thus, byway of example, and not limitation, embodiments of the invention cancomprise at least two distinctly different kinds of computer-readablemedia: physical computer readable storage media and transmissioncomputer readable media.

Physical computer readable storage media includes RAM, ROM, EEPROM,CD-ROM or other optical disk storage (such as CDs, DVDs, etc), magneticdisk storage or other magnetic storage devices, or any other mediumwhich can be used to store desired program code means in the form ofcomputer-executable instructions or data structures and which can beaccessed by a general purpose or special purpose computer.

A “network” is defined as one or more data links that enable thetransport of electronic data between computer systems and/or modulesand/or other electronic devices. When information is transferred orprovided over a network or another communications connection (eitherhardwired, wireless, or a combination of hardwired or wireless) to acomputer, the computer properly views the connection as a transmissionmedium. Transmissions media can include a network and/or data linkswhich can be used to carry or desired program code means in the form ofcomputer-executable instructions or data structures and which can beaccessed by a general purpose or special purpose computer. Combinationsof the above are also included within the scope of computer-readablemedia.

Further, upon reaching various computer system components, program codemeans in the form of computer-executable instructions or data structurescan be transferred automatically from transmission computer readablemedia to physical computer readable storage media (or vice versa). Forexample, computer-executable instructions or data structures receivedover a network or data link can be buffered in RAM within a networkinterface module (e.g., a “NIC”), and then eventually transferred tocomputer system RAM and/or to less volatile computer readable physicalstorage media at a computer system. Thus, computer readable physicalstorage media can be included in computer system components that also(or even primarily) utilize transmission media.

Computer-executable instructions comprise, for example, instructions anddata which cause a general purpose computer, special purpose computer,or special purpose processing device to perform a certain function orgroup of functions. The computer executable instructions may be, forexample, binaries, intermediate format instructions such as assemblylanguage, or even source code. Although the subject matter has beendescribed in language specific to structural features and/ormethodological acts, it is to be understood that the subject matterdefined in the appended claims is not necessarily limited to thedescribed features or acts described above. Rather, the describedfeatures and acts are disclosed as example forms of implementing theclaims.

Those skilled in the art will appreciate that the invention may bepracticed in network computing environments with many types of computersystem configurations, including, personal computers, desktop computers,laptop computers, message processors, hand-held devices, multi-processorsystems, microprocessor-based or programmable consumer electronics,network PCs, minicomputers, mainframe computers, mobile telephones,PDAs, pagers, routers, switches, and the like. The invention may also bepracticed in distributed system environments where local and remotecomputer systems, which are linked (either by hardwired data links,wireless data links, or by a combination of hardwired and wireless datalinks) through a network, both perform tasks. In a distributed systemenvironment, program modules may be located in both local and remotememory storage devices.

Alternatively, or in addition, the functionally described herein can beperformed, at least in part, by one or more hardware logic components.For example, and without limitation, illustrative types of hardwarelogic components that can be used include Field-programmable Gate Arrays(FPGAs), Program-specific Integrated Circuits (ASICs), Program-specificStandard Products (ASSPs), System-on-a-chip systems (SOCs), ComplexProgrammable Logic Devices (CPLDs), etc.

The present invention may be embodied in other specific forms withoutdeparting from its spirit or characteristics. The described embodimentsare to be considered in all respects only as illustrative and notrestrictive. The scope of the invention is, therefore, indicated by theappended claims rather than by the foregoing description. All changeswhich come within the meaning and range of equivalency of the claims areto be embraced within their scope.

What is claimed is:
 1. A method, implemented at a computer system thatincludes one or more processors, for performing a distributed dataoperation, the method comprising the computer system performing thefollowing: receiving, from a remote system, a request to have anoperation performed by node endpoints accessible to the computer system,each of the node endpoints accessible to the computer system including apartition of a sharded table; determining, at the computer system, howmany of the node endpoints are needed to satisfy the request, whereinthe determination is based on information obtained from an updateabledirectory that maps the sharded table across the node endpoints byidentifying where each partition of the sharded table is located acrossthe node endpoints; determining, at the computer system, a computationalprocessing overhead comparison that compares utilizing only slave nodeendpoints to satisfy the request to utilizing at least one intermediarynode endpoint to satisfy the request; based on the computationalprocessing overhead comparison, determining, at the computer system, toutilize an intermediary node endpoint and a slave node endpoint tosatisfy the request; and satisfying the request utilizing theintermediary node endpoint and the slave node endpoint.
 2. The method ofclaim 1, wherein the one or more intermediary node endpoints areselected based on a location of hosted shards.
 3. The method of claim 1,wherein the one or more intermediary node endpoints are selected basedon a communication costs and a cost to assemble distributed queryresults.
 4. The method of claim 1, further comprising selecting the oneor more intermediary node endpoints in a round robin fashion.
 5. Themethod of claim 1, further comprising selecting the one or moreintermediary node endpoints in a random fashion.
 6. The method of claim1, wherein after determining how many node endpoints are needed tosatisfy the request, the method further includes selecting a dataoperation plan from a group comprising a flat data operation plan, ahierarchical data operation plan, or a combination of partiallyflat/partially hierarchical data operation plan.
 7. In a distributedcomputing environment, a computer system comprising: one or moreprocessors; and one or more computer readable hardware storage deviceshaving stored thereon computer executable instructions that areexecutable by the one or more processors and that cause the computersystem to perform a method comprising the computer system performing thefollowing: receive, from a remote system, a request to have an operationperformed by node endpoints accessible to the computer system, each ofthe node endpoints accessible to the computer system including apartition of a sharded table; determine, at the computer system, howmany of the node endpoints are needed to satisfy the request, whereinthe determination is based on information obtained from an updateabledirectory that maps the sharded table across the node endpoints byidentifying where each partition of the sharded table is located acrossthe plurality of node endpoints; determine, at the computer system, acomputational processing overhead comparison that compares utilizingonly slave node endpoints to satisfy the request to utilizing at leastone intermediary node endpoint to satisfy the request; based on thecomputational processing overhead comparison, determine, and thecomputer system, to utilize an intermediary node endpoint in combinationwith a slave node endpoint to satisfy the request and satisfy therequest by utilizing the intermediary node endpoint in combination withthe slave node endpoint.
 8. The computing system of claim 7, wherein theone or more intermediary node endpoints are selected based on a locationof hosted shards.
 9. The computing system of claim 7, wherein the one ormore intermediary node endpoints are selected based on a communicationcosts and a cost to assemble distributed query results.
 10. Thecomputing system of claim 7, further comprising selecting the one ormore intermediary node endpoints a round robin fashion.
 11. Thecomputing system of claim 7, further comprising selecting the one ormore intermediary node endpoints in a random fashion.
 12. The computingsystem of claim 7, wherein after determining how many node endpoints areneeded to satisfy the request, the method further includes selecting adata operation plan from a group comprising a flat data operation plan,a hierarchical data operation plan, or a combination of partiallyflat/partially hierarchical data operation plan.
 13. The computer systemof claim 7, wherein the request is part of a session of requests, andwherein servicing the request includes: after determining how many nodeendpoints are needed to satisfy the request, selecting a particular setof node endpoints that will be used to service the request; from withinthe particular set, designating a particular node endpoint to act as amaster node endpoint and designate each remaining node endpoint includedwithin the particular set as slave node endpoints; and directing therequest and all subsequent requests included within the session ofrequests to the master node endpoint.
 14. The computer system of claim13, wherein the operation includes a data processing operation, andwherein servicing the data processing operation includes: causing afirst slave node endpoint to fetch a data item from persistent storageand perform a merge on the data item; causing a second slave nodeendpoint to perform a second merge on the data item; persisting the dataitem to the persistent storage; and in response to persisting the dataitem, causing the master node endpoint to compute a new version of theupdateable directory and persisting the new version of the updateabledirectory to the persistent storage.
 15. The computer system of claim13, wherein the operation includes a query operation, and whereinservicing the query operation includes: causing the master node endpointto request at least one of the slave node endpoints to perform one ormore sub-queries; for each slave node endpoint that performed asub-query, saving results of each sub-query locally on eachcorresponding slave node endpoint; in addition to locally saving theresults, causing the slave node endpoints to pass the results to themaster node endpoint; and causing the master node endpoint to aggregatethe results to form a final result.
 16. One or more hardware storagedevice having stored thereon computer executable instructions that areexecutable by one or more processors of a computer system to cause thecomputer system to perform a distributed data operation by at leastcausing the computer system to: receive, from a remote system, a requestto have an operation performed by node endpoints accessible to thecomputer system, each of the node endpoints accessible to the computersystem including a partition of a sharded table; determine, at thecomputer system, how many of the node endpoints are needed to satisfythe request, wherein the determination is based on information obtainedfrom an updateable directory that maps the sharded table across the nodeendpoints by identifying where each partition of the sharded table islocated across the plurality of node endpoints; determine, at thecomputer system, a computational processing overhead comparison thatcompares utilizing only slave node endpoints to satisfy the request toutilizing at least one intermediary node endpoint to satisfy therequest; based on the computational processing overhead comparison,determine, and the computer system, to utilize an intermediary nodeendpoint in combination with a slave node endpoint to satisfy therequest and satisfy the request by utilizing the intermediary nodeendpoint in combination with the slave node endpoint.